using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.Serialization;
using System.Web.Script.Serialization;
using System.Xml.Serialization;
using XCode;
using XCode.Configuration;
using XCode.DataAccessLayer;

namespace Kinlo.Entitys
{
    /// <summary>右装盘机扫码</summary>
    [Serializable]
    [DataObject]
    [Description("右装盘机扫码")]
    [BindTable("TrayFillerRightData", Description = "右装盘机扫码", ConnName = "MySql", DbType = DatabaseType.None)]
    public partial class TrayFillerRightData
    {
        #region 属性
        private Int64 _Id;
        /// <summary>雪花ID</summary>
        [DisplayName("雪花ID")]
        [Description("雪花ID")]
        [DataObjectField(true, false, false, 0)]
        [BindColumn("Id", "雪花ID", "")]
        public Int64 Id { get => _Id; set { if (OnPropertyChanging("Id", value)) { _Id = value; OnPropertyChanged("Id"); } } }

        private DateTime _AcquisitionTime;
        /// <summary>数据获取时间</summary>
        [DisplayName("数据获取时间")]
        [Description("数据获取时间")]
        [DataObjectField(false, false, true, 0)]
        [BindColumn("Acquisition_Time", "数据获取时间", "")]
        public DateTime AcquisitionTime { get => _AcquisitionTime; set { if (OnPropertyChanging("AcquisitionTime", value)) { _AcquisitionTime = value; OnPropertyChanged("AcquisitionTime"); } } }

        private String _PalletNo;
        /// <summary>托盘号</summary>
        [DisplayName("托盘号")]
        [Description("托盘号")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("PalletNo", "托盘号", "")]
        public String PalletNo { get => _PalletNo; set { if (OnPropertyChanging("PalletNo", value)) { _PalletNo = value; OnPropertyChanged("PalletNo"); } } }

        private Int32 _Position;
        /// <summary>位置</summary>
        [DisplayName("位置")]
        [Description("位置")]
        [DataObjectField(false, false, false, 0)]
        [BindColumn("Position", "位置", "")]
        public Int32 Position { get => _Position; set { if (OnPropertyChanging("Position", value)) { _Position = value; OnPropertyChanged("Position"); } } }

        private DateTime _LoadInboundTime;
        /// <summary>装盘入站时间</summary>
        [DisplayName("装盘入站时间")]
        [Description("装盘入站时间")]
        [DataObjectField(false, false, true, 0)]
        [BindColumn("LoadInboundTime", "装盘入站时间", "")]
        public DateTime LoadInboundTime { get => _LoadInboundTime; set { if (OnPropertyChanging("LoadInboundTime", value)) { _LoadInboundTime = value; OnPropertyChanged("LoadInboundTime"); } } }

        private String _NumPerPallet;
        /// <summary>装盘数量</summary>
        [DisplayName("装盘数量")]
        [Description("装盘数量")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("NumPerPallet", "装盘数量", "")]
        public String NumPerPallet { get => _NumPerPallet; set { if (OnPropertyChanging("NumPerPallet", value)) { _NumPerPallet = value; OnPropertyChanged("NumPerPallet"); } } }

        private String _Operator;
        /// <summary>工号(操作员)</summary>
        [DisplayName("工号")]
        [Description("工号(操作员)")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("Operator", "工号(操作员)", "")]
        public String Operator { get => _Operator; set { if (OnPropertyChanging("Operator", value)) { _Operator = value; OnPropertyChanged("Operator"); } } }

        private String _EquipmentCode;
        /// <summary>设备编码</summary>
        [DisplayName("设备编码")]
        [Description("设备编码")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("EquipmentCode", "设备编码", "")]
        public String EquipmentCode { get => _EquipmentCode; set { if (OnPropertyChanging("EquipmentCode", value)) { _EquipmentCode = value; OnPropertyChanged("EquipmentCode"); } } }

        private String _EquipmentStatus;
        /// <summary>设备状态</summary>
        [DisplayName("设备状态")]
        [Description("设备状态")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("EquipmentStatus", "设备状态", "")]
        public String EquipmentStatus { get => _EquipmentStatus; set { if (OnPropertyChanging("EquipmentStatus", value)) { _EquipmentStatus = value; OnPropertyChanged("EquipmentStatus"); } } }

        private String _Team;
        /// <summary>班组</summary>
        [DisplayName("班组")]
        [Description("班组")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("Team", "班组", "")]
        public String Team { get => _Team; set { if (OnPropertyChanging("Team", value)) { _Team = value; OnPropertyChanged("Team"); } } }

        private String _Shift;
        /// <summary>班次</summary>
        [DisplayName("班次")]
        [Description("班次")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("Shift", "班次", "")]
        public String Shift { get => _Shift; set { if (OnPropertyChanging("Shift", value)) { _Shift = value; OnPropertyChanged("Shift"); } } }

        private String _WorkOrderNo;
        /// <summary>工单号</summary>
        [DisplayName("工单号")]
        [Description("工单号")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("WorkOrderNo", "工单号", "")]
        public String WorkOrderNo { get => _WorkOrderNo; set { if (OnPropertyChanging("WorkOrderNo", value)) { _WorkOrderNo = value; OnPropertyChanged("WorkOrderNo"); } } }

        private String _ProcessId;
        /// <summary>工序编码</summary>
        [DisplayName("工序编码")]
        [Description("工序编码")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("process_id", "工序编码", "")]
        public String ProcessId { get => _ProcessId; set { if (OnPropertyChanging("ProcessId", value)) { _ProcessId = value; OnPropertyChanged("ProcessId"); } } }

        private String _MaterialCode;
        /// <summary>料号</summary>
        [DisplayName("料号")]
        [Description("料号")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("Material_Code", "料号", "")]
        public String MaterialCode { get => _MaterialCode; set { if (OnPropertyChanging("MaterialCode", value)) { _MaterialCode = value; OnPropertyChanged("MaterialCode"); } } }

        private String _PcNo;
        /// <summary>订单批号</summary>
        [DisplayName("订单批号")]
        [Description("订单批号")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("PC_No", "订单批号", "")]
        public String PcNo { get => _PcNo; set { if (OnPropertyChanging("PcNo", value)) { _PcNo = value; OnPropertyChanged("PcNo"); } } }

        private String _WorkorderstatusName;
        /// <summary>工单状态</summary>
        [DisplayName("工单状态")]
        [Description("工单状态")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("WorkOrderStatus_Name", "工单状态", "")]
        public String WorkorderstatusName { get => _WorkorderstatusName; set { if (OnPropertyChanging("WorkorderstatusName", value)) { _WorkorderstatusName = value; OnPropertyChanged("WorkorderstatusName"); } } }

        private String _PlanedStart;
        /// <summary>计划开始时间</summary>
        [DisplayName("计划开始时间")]
        [Description("计划开始时间")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("PlanedStart", "计划开始时间", "")]
        public String PlanedStart { get => _PlanedStart; set { if (OnPropertyChanging("PlanedStart", value)) { _PlanedStart = value; OnPropertyChanged("PlanedStart"); } } }

        private String _PlanedEndDate;
        /// <summary>计划结束时间</summary>
        [DisplayName("计划结束时间")]
        [Description("计划结束时间")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("PlanedEndDate", "计划结束时间", "")]
        public String PlanedEndDate { get => _PlanedEndDate; set { if (OnPropertyChanging("PlanedEndDate", value)) { _PlanedEndDate = value; OnPropertyChanged("PlanedEndDate"); } } }

        private String _ProductionOrderNO;
        /// <summary>订单号</summary>
        [DisplayName("订单号")]
        [Description("订单号")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("ProductionOrderNO", "订单号", "")]
        public String ProductionOrderNO { get => _ProductionOrderNO; set { if (OnPropertyChanging("ProductionOrderNO", value)) { _ProductionOrderNO = value; OnPropertyChanged("ProductionOrderNO"); } } }

        private String _PutIntoNumber;
        /// <summary>投入数</summary>
        [DisplayName("投入数")]
        [Description("投入数")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("PutIntoNumber", "投入数", "")]
        public String PutIntoNumber { get => _PutIntoNumber; set { if (OnPropertyChanging("PutIntoNumber", value)) { _PutIntoNumber = value; OnPropertyChanged("PutIntoNumber"); } } }

        private String _QualifiedNumber;
        /// <summary>合格数</summary>
        [DisplayName("合格数")]
        [Description("合格数")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("QualifiedNumber", "合格数", "")]
        public String QualifiedNumber { get => _QualifiedNumber; set { if (OnPropertyChanging("QualifiedNumber", value)) { _QualifiedNumber = value; OnPropertyChanged("QualifiedNumber"); } } }

        private String _UnqualifiedNumber;
        /// <summary>不合格数量</summary>
        [DisplayName("不合格数量")]
        [Description("不合格数量")]
        [DataObjectField(false, false, true, 64)]
        [BindColumn("UnqualifiedNumber", "不合格数量", "")]
        public String UnqualifiedNumber { get => _UnqualifiedNumber; set { if (OnPropertyChanging("UnqualifiedNumber", value)) { _UnqualifiedNumber = value; OnPropertyChanged("UnqualifiedNumber"); } } }
        #endregion

        #region 获取/设置 字段值
        /// <summary>获取/设置 字段值</summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case "Id": return _Id;
                    case "AcquisitionTime": return _AcquisitionTime;
                    case "PalletNo": return _PalletNo;
                    case "Position": return _Position;
                    case "LoadInboundTime": return _LoadInboundTime;
                    case "NumPerPallet": return _NumPerPallet;
                    case "Operator": return _Operator;
                    case "EquipmentCode": return _EquipmentCode;
                    case "EquipmentStatus": return _EquipmentStatus;
                    case "Team": return _Team;
                    case "Shift": return _Shift;
                    case "WorkOrderNo": return _WorkOrderNo;
                    case "ProcessId": return _ProcessId;
                    case "MaterialCode": return _MaterialCode;
                    case "PcNo": return _PcNo;
                    case "WorkorderstatusName": return _WorkorderstatusName;
                    case "PlanedStart": return _PlanedStart;
                    case "PlanedEndDate": return _PlanedEndDate;
                    case "ProductionOrderNO": return _ProductionOrderNO;
                    case "PutIntoNumber": return _PutIntoNumber;
                    case "QualifiedNumber": return _QualifiedNumber;
                    case "UnqualifiedNumber": return _UnqualifiedNumber;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case "Id": _Id = value.ToLong(); break;
                    case "AcquisitionTime": _AcquisitionTime = value.ToDateTime(); break;
                    case "PalletNo": _PalletNo = Convert.ToString(value); break;
                    case "Position": _Position = value.ToInt(); break;
                    case "LoadInboundTime": _LoadInboundTime = value.ToDateTime(); break;
                    case "NumPerPallet": _NumPerPallet = Convert.ToString(value); break;
                    case "Operator": _Operator = Convert.ToString(value); break;
                    case "EquipmentCode": _EquipmentCode = Convert.ToString(value); break;
                    case "EquipmentStatus": _EquipmentStatus = Convert.ToString(value); break;
                    case "Team": _Team = Convert.ToString(value); break;
                    case "Shift": _Shift = Convert.ToString(value); break;
                    case "WorkOrderNo": _WorkOrderNo = Convert.ToString(value); break;
                    case "ProcessId": _ProcessId = Convert.ToString(value); break;
                    case "MaterialCode": _MaterialCode = Convert.ToString(value); break;
                    case "PcNo": _PcNo = Convert.ToString(value); break;
                    case "WorkorderstatusName": _WorkorderstatusName = Convert.ToString(value); break;
                    case "PlanedStart": _PlanedStart = Convert.ToString(value); break;
                    case "PlanedEndDate": _PlanedEndDate = Convert.ToString(value); break;
                    case "ProductionOrderNO": _ProductionOrderNO = Convert.ToString(value); break;
                    case "PutIntoNumber": _PutIntoNumber = Convert.ToString(value); break;
                    case "QualifiedNumber": _QualifiedNumber = Convert.ToString(value); break;
                    case "UnqualifiedNumber": _UnqualifiedNumber = Convert.ToString(value); break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        /// <summary>取得右装盘机扫码字段信息的快捷方式</summary>
        public partial class _
        {
            /// <summary>雪花ID</summary>
            public static readonly Field Id = FindByName("Id");

            /// <summary>数据获取时间</summary>
            public static readonly Field AcquisitionTime = FindByName("AcquisitionTime");

            /// <summary>托盘号</summary>
            public static readonly Field PalletNo = FindByName("PalletNo");

            /// <summary>位置</summary>
            public static readonly Field Position = FindByName("Position");

            /// <summary>装盘入站时间</summary>
            public static readonly Field LoadInboundTime = FindByName("LoadInboundTime");

            /// <summary>装盘数量</summary>
            public static readonly Field NumPerPallet = FindByName("NumPerPallet");

            /// <summary>工号(操作员)</summary>
            public static readonly Field Operator = FindByName("Operator");

            /// <summary>设备编码</summary>
            public static readonly Field EquipmentCode = FindByName("EquipmentCode");

            /// <summary>设备状态</summary>
            public static readonly Field EquipmentStatus = FindByName("EquipmentStatus");

            /// <summary>班组</summary>
            public static readonly Field Team = FindByName("Team");

            /// <summary>班次</summary>
            public static readonly Field Shift = FindByName("Shift");

            /// <summary>工单号</summary>
            public static readonly Field WorkOrderNo = FindByName("WorkOrderNo");

            /// <summary>工序编码</summary>
            public static readonly Field ProcessId = FindByName("ProcessId");

            /// <summary>料号</summary>
            public static readonly Field MaterialCode = FindByName("MaterialCode");

            /// <summary>订单批号</summary>
            public static readonly Field PcNo = FindByName("PcNo");

            /// <summary>工单状态</summary>
            public static readonly Field WorkorderstatusName = FindByName("WorkorderstatusName");

            /// <summary>计划开始时间</summary>
            public static readonly Field PlanedStart = FindByName("PlanedStart");

            /// <summary>计划结束时间</summary>
            public static readonly Field PlanedEndDate = FindByName("PlanedEndDate");

            /// <summary>订单号</summary>
            public static readonly Field ProductionOrderNO = FindByName("ProductionOrderNO");

            /// <summary>投入数</summary>
            public static readonly Field PutIntoNumber = FindByName("PutIntoNumber");

            /// <summary>合格数</summary>
            public static readonly Field QualifiedNumber = FindByName("QualifiedNumber");

            /// <summary>不合格数量</summary>
            public static readonly Field UnqualifiedNumber = FindByName("UnqualifiedNumber");

            static Field FindByName(String name) => Meta.Table.FindByName(name);
        }

        /// <summary>取得右装盘机扫码字段名称的快捷方式</summary>
        public partial class __
        {
            /// <summary>雪花ID</summary>
            public const String Id = "Id";

            /// <summary>数据获取时间</summary>
            public const String AcquisitionTime = "AcquisitionTime";

            /// <summary>托盘号</summary>
            public const String PalletNo = "PalletNo";

            /// <summary>位置</summary>
            public const String Position = "Position";

            /// <summary>装盘入站时间</summary>
            public const String LoadInboundTime = "LoadInboundTime";

            /// <summary>装盘数量</summary>
            public const String NumPerPallet = "NumPerPallet";

            /// <summary>工号(操作员)</summary>
            public const String Operator = "Operator";

            /// <summary>设备编码</summary>
            public const String EquipmentCode = "EquipmentCode";

            /// <summary>设备状态</summary>
            public const String EquipmentStatus = "EquipmentStatus";

            /// <summary>班组</summary>
            public const String Team = "Team";

            /// <summary>班次</summary>
            public const String Shift = "Shift";

            /// <summary>工单号</summary>
            public const String WorkOrderNo = "WorkOrderNo";

            /// <summary>工序编码</summary>
            public const String ProcessId = "ProcessId";

            /// <summary>料号</summary>
            public const String MaterialCode = "MaterialCode";

            /// <summary>订单批号</summary>
            public const String PcNo = "PcNo";

            /// <summary>工单状态</summary>
            public const String WorkorderstatusName = "WorkorderstatusName";

            /// <summary>计划开始时间</summary>
            public const String PlanedStart = "PlanedStart";

            /// <summary>计划结束时间</summary>
            public const String PlanedEndDate = "PlanedEndDate";

            /// <summary>订单号</summary>
            public const String ProductionOrderNO = "ProductionOrderNO";

            /// <summary>投入数</summary>
            public const String PutIntoNumber = "PutIntoNumber";

            /// <summary>合格数</summary>
            public const String QualifiedNumber = "QualifiedNumber";

            /// <summary>不合格数量</summary>
            public const String UnqualifiedNumber = "UnqualifiedNumber";
        }
        #endregion
    }
}